// 定义类型：得到接口返回值，复制数据来定义接口
export namespace User {
  export interface UserItem {
    id: number
    // createId: null
    // createName: null
    // updateId: null
    // updateName: null
    createTime: string
    updateTime: string
    // param: {}
    username: string
    // password: '1bbd886460827015e5d605ed44252251'
    name: string
    // phone: null
    // warehouseId: null
    roleName: string
    // warehouseName: null
  }

  export type UserList = UserItem[]

  export interface GetUserListData {
    records: UserList
    total: number
    // size: 5
    // current: 1
    // orders: []
    // optimizeCountSql: true
    // hitCount: false
    // countId: null
    // maxLimit: null
    // searchCount: true
    // pages: 3
  }

  export interface AddUserParams {
    id?: number
    username: string
    name: string
    password?: string
  }

  export interface RoleItem {
    id: number
    roleName: string
  }

  export type RoleList = RoleItem[]
  export interface GetUserRoleData {
    allRolesList: RoleList
    assignRoles: RoleList
  }
}
